from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.

def index(request):
    # 1.设置cookie
    response = HttpResponse("操作cookie")

    # response.set_cookie('passwoed','baokezhenshuai',max_age=3600)


    # 2.读取cookie
    print(request.COOKIES.get('password'))

    # 3.删除cookie
    response.delete_cookie('password')

    return response